package com.xu.modules.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

import lombok.Builder;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 访客表
 * </p>
 *
 * @author xu
 * @since 2022-07-28
 */
@Getter
@Setter
@TableName("visitor")
@Builder
public class VisitorEntity implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 访客ID
     */
    @TableId(value = "visitor_id", type = IdType.AUTO)
    private Integer visitorId;

    /**
     * 访客IP
     */
    @TableField("visitor_ip")
    private String visitorIp;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
}
